package nine_Chat;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.ArrayList;
import java.util.List;

public class Server {
    public static List<Socket> allSocketOnline = new ArrayList<Socket>();

    public static void main(String[] args) {
        try {
            ServerSocket ss = new ServerSocket(9999);
            while (true) {
                Socket s = ss.accept();
                allSocketOnline.add(s);
                new ServerReaderThreadDuanToDuan(s).start();
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
